package com.gdust.gkyx.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gdust.gkyx.model.sys.Region;
import com.gdust.gkyx.sys.mapper.RegionMapper;
import com.gdust.gkyx.sys.service.RegionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: RegionServiceImpl
 * Package: com.gdust.gkyx.sys.service.impl
 * Description:
 *
 * @Author syun
 * @Create 2025/1/24 13:56
 * @Version 1.0
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
    /**
     * //根据区域关键字查询区域列表信息
     * @param keyword 关键字---地区名
     * @return
     */
    @Override
    public List<Region> getRegionByKeyword(String keyword) {
        LambdaQueryWrapper<Region> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(Region::getName,keyword);
        List<Region> list = baseMapper.selectList(wrapper);
        return list;
    }
}
